part of engine;

class ConfigurationHandler {
  
  CanvasEngine _engine;
  InputManager _inputManager;
  
  ConfigurationHandler (CanvasEngine engine) {
    _engine = engine;
    _inputManager = (ServiceManager.getService("InputManager") as InputManager);
  }
  
  void registerConfigurationToggle(int keyCode, toggle()) {
    Keyboard keyboard = _inputManager.getMethod(Keyboard.INPUT_TYPE) as Keyboard;
    keyboard.onKeyDown(keyCode, toggle);
  }
}

